-
Notifications
You must be signed in to change notification settings - Fork 38
libsql: attach databases from other namespaces as readonly #770
base: main
Are you sure you want to change the base?
Conversation
With this proof-of-concept patch, other namespaces hosted on the same sqld machine are now attached in readonly mode, so that users can read from other databases when connected to a particular one.
Assumption in this PoC is that all namespaces in a single sqld instance belong to a single user, so they're visible. That assumption is not going to hold long-term, with our multitenancy plans, and then we'd have to only attach databases that a particular user is allowed to see |
This is not going to work for multiple reasons:
And I don't think that this is a good idea either:
|
All valid points, but we had users asking how to access another database of theirs, so that they can read from it. Maybe we should just consider an API that allows you to dynamically attach another database from a different namespace to either all future connections, or one particular connection (the latter e.g. by overriding the |
Also,
How? And did we specify the isolation guarantees somewhere? In general if we have multiple users using namespaces then we don't want them to know about each other indeed, but shareable namespaces of a single user can be a worthy feature, if doable |
And one more - what's an |
An active namespace is a namespace that is loaded in memory, and whose life-cycle is managed by the namespace store |
Downgrading to draft, since it should have been marked draft in the first place. Also, some preliminary conclusions:
|
With this proof-of-concept patch, other namespaces hosted on the same sqld machine are now attached in readonly mode, so that users can read from other databases when connected to a particular one.
Example:
Database1:
Database2: